<template>
  <Card>
    <template slot="title">
      编辑菜单：监控页
    </template>
    <Form label-position="right" :label-width="80">
      <FormItem label="标题:">
        <Input placeholder="Enter something..."></Input>
      </FormItem>
      <FormItem label="副标题:">
        <Input placeholder="Enter something..."></Input>
      </FormItem>
      <FormItem label="路径:">
        <Input placeholder="Enter something..."></Input>
      </FormItem>
      <FormItem label="打开方式:">
        <RadioGroup>
          <Radio label="male">当前窗口</Radio>
          <Radio label="female">新窗口</Radio>
        </RadioGroup>
      </FormItem>
      <FormItem label="图标:">
        <Dropdown trigger="custom" :visible="visible" style="width: 100%;">
          <ButtonGroup style="width: 100%;display: flex">
            <Button @click="handleOpen" style="flex: 1;text-align: left">
              {{ icon }}
            </Button>
            <Button @click="handleOpen">
              <Icon type="ios-arrow-down"></Icon>
            </Button>
          </ButtonGroup>
          <DropdownMenu slot="list">
            <search-icon></search-icon>
          </DropdownMenu>
        </Dropdown>

      </FormItem>
      <FormItem>
        <Button type="primary">Submit</Button>
        <Button style="margin-left: 8px">Cancel</Button>
      </FormItem>
    </Form>
  </Card>
</template>

<script>
import searchIcon from "./searchIcon";

export default {
  name: "menuEdit",
  components: {
    searchIcon
  },
  props: {
    tableData: {
      type: Array,
      default: [],
    },
    icon: {
      type: String,
      default: 'icon'
    }
  },
  data() {
    return {
      columns1: [
        {
          title: '编号',
          key: 'nodeKey',
        }, {
          title: '名称',
          slot: 'title',
        }, {
          title: '地址',
          key: 'name'
        }
      ],
      visible: false
    }
  },
  methods: {
    handleOpen() {
      this.visible = true;
    },
    handleClose() {
      this.visible = false;
    }
  }
}
</script>

<style scoped>

</style>
